package com.github.catvod.spider;

import android.content.Context;
import android.text.TextUtils;
import android.util.Base64;
import com.github.catvod.crawler.Spider;
import com.github.catvod.parser.C0000;
import com.github.catvod.parser.C0001;
import com.github.catvod.parser.C0002;
import com.github.catvod.parser.C0003;
import com.github.catvod.parser.C0004;
import com.github.catvod.parser.C0005;
import com.github.catvod.parser.C0006;
import com.github.catvod.parser.C0007;
import com.github.catvod.parser.C0008;
import com.github.catvod.parser.C0009;
import com.github.catvod.spider.merge.C0011;
import com.github.catvod.spider.merge.C0012;
import com.github.catvod.spider.merge.C0013;
import com.github.catvod.spider.merge.C0014;
import com.github.catvod.spider.merge.C0015;
import com.github.catvod.spider.merge.CE;
import com.github.catvod.spider.merge.O;
import com.github.catvod.spider.merge.fP;
import com.github.catvod.spider.merge.jP;
import java.io.PrintStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;

/* loaded from: classes.dex */
public class Mayiys extends Spider {

    /* renamed from: short, reason: not valid java name */
    private static final short[] f41short = {2323, 2319, 2319, 2315, 2369, 2388, 2388, 2316, 2316, 2316, 2389, 2313, 2305, 2306, 2312, 2389, 2328, 2328, 2826, 2830, 2816, 2851, 2826, 2822, 2935, 2816, 2820, 2836, 2870, 2816, 2836, 2830, 2853, 2932, 2819, 2838, 2818, 2821, 2822, 2838, 2834, 2822, 2822, 2931, 2816, 2827, 2822, 2819, 2820, 2821, 2863, 2864, 2828, 2821, 2848, 2838, 2820, 2822, 2859, 2862, 2827, 2857, 2857, 2825, 2878, 2933, 2862, 2839, 2850, 2853, 2836, 2862, 2864, 2868, 2849, 2836, 2859, 2852, 2934, 2851, 2833, 2933, 2848, 2878, 2838, 2845, 2861, 2821, 2833, 2833, 2822, 2822, 2820, 2826, 2827, 2858, 2817, 2854, 2931, 2868, 2865, 2877, 2817, 2933, 2847, 2868, 2826, 2933, 2929, 2851, 2838, 2933, 2822, 2870, 2847, 2861, 2819, 2830, 2826, 2866, 2869, 2819, 2857, 2943, 2818, 2849, 2869, 2850, 2865, 2819, 2826, 2866, 2870, 2930, 2835, 2816, 2870, 2830, 2817, 2820, 2854, 2854, 2864, 2818, 2846, 2851, 2877, 2832, 2838, 2817, 2818, 2932, 2830, 2826, 2858, 2857, 2879, 2818, 2860, 2879, 2862, 2850, 2818, 2828, 2928, 2827, 2869, 2935, 2856, 2935, 2821, 2861, 2836, 2845, 2930, 2825, 2827, 2852, 2854, 2835, 2857, 2856, 2832, 2827, 2935, 2920, 2924, 2835, 2856, 2943, 2932, 2928, 2862, 2930, 2847, 2839, 2863, 2877, 2854, 2845, 2832, 2831, 2878, 2931, 2851, 2942, 2816, 2924, 2822, 2854, 2829, 2942, 2826, 2829, 2819, 2822, 2932, 2817, 2821, 2837, 2930, 2820, 2838, 2928, 2865, 2862, 2934, 2864, 2830, 2821, 2822, 2864, 2938, 2938, 757, 723, 709, 722, 653, 737, 711, 709, 718, 724, 2174, 2170, 2169, 2149, 2149, 2145, 2110, 2085, 2111, 2088, 2111, 2082, 1271, 1262, 1253, 1246, 1267, 1252, 1260, 1248, 1267, 1258, 1266, 1356, 1365, 1374, 1381, 1354, 1363, 1369, 1794, 1799, 1795, 1799, 1818, 2206, 2183, 2188, 2231, 2182, 2185, 2181, 2189, 678, 703, 692, 655, 697, 692, 2728, 2745, 2751, 2749, 988, 967, 988, 969, 964, 2009, 2012, 1990, 1985, 1763, 1791, 1787, 1768, 2392, 2389, 2396, 2377, 809, 826, 813, 809, 2583, 2624, 2569, 2583, 2638, 2569, 2583, 2645, 2649, 2651, 2668, 2625, 2632, 2653, 2635, 2583, 2652, 2653, 2636, 2649, 2641, 2644, 1329, 1389, 1378, 1391, 1405, 1405, 1402, 1399, 1406, 1387, 1331, 569, 638, 621, 634, 638, 546, 2956, 3027, 3023, 3019, 3032, 2967, 2501, 2455, 2458, 2451, 2438, 2442, 2439, 2526, 894, 808, 825, 831, 829, 869, 1238, 1180, 1177, 1181, 1177, 1156, 1229, 1219, 1216, 1637, 1584, 1578, 1572, 1581, 1662, 2760, 2689, 2717, 2771, 2783, 1078, 1075, 1062, 1075, 1349, 1364, 1362, 1360, 1366, 1370, 1344, 1371, 1345, 2005, 1638, 1638, 1638, 2734, 2743, 2748, 2695, 2747, 2743, 2742, 2732, 2749, 2742, 2732, 1509, 1532, 1527, 1484, 1522, 1520, 1511, 1532, 1505, 2669, 2676, 2687, 2628, 2665, 2686, 2678, 2682, 2665, 2672, 2664, 839, 862, 853, 878, 848, 835, 852, 848, 3076, 3101, 3094, 3117, 3083, 3095, 3091, 3072, 1291, 1298, 1305, 1314, 1293, 1300, 1310, 3026, 3019, 3008, 3067, 3018, 3013, 3017, 3009, 1168, 1161, 1154, 1209, 1167, 1154, 688, 743, 686, 688, 745, 686, 688, 745, 752, 763, 688, 763, 762, 747, 766, 758, 755, 748, 672, 745, 752, 763, 758, 763, 748, 747, 749, 674, 1578, 1663, 1637, 1643, 1634, 1585, 1799, 1870, 1874, 1820, 1808, -30059, 18946, -1415, 1316, 1313, 1332, 1313, 1380, 1385, 1376, 1397, 1359, 1406, 1393, 1405, 1397, 1392, 1385, 1378, 1369, 1381, 1386, 1383, 1397, 1397, 3025, 3016, 3011, 3064, 3031, 3019, 3014, 3038, 3064, 3019, 3022, 3028, 3027, 1284, 1283, 1309, 1282, 2324, 2312, 2309, 2333, 2305, 2326, 2363, 2317, 2314, 2306, 2315, 1163, 1168, 1175, 1167, 3265, 3278, 3266, 3274, 1286, 1298, 1295, 1293, 2319, 545, 550, 568, 1295, 372, 1343, 1318, 1325, 1302, 1337, 1317, 1320, 1328, 1302, 1327, 1339, 1318, 1316, 1152, 1177, 1170, 1193, 1158, 1178, 1175, 1167, 1193, 1155, 1156, 1178, 1096, 1101, 1111, 1104, 3196, 3197, 3183, 3076, 3089, 1378, 1391, 1382, 1395, 1353, 1407, 1394, 506, 503, 510, 491, 465, 480, 495, 483, 491, 2576, 2631, 2574, 2576, 2633, 2574, 2576, 2642, 2654, 2652, 2667, 2630, 2639, 2650, 2636, 2576, 2635, 2630, 2639, 2650, 2636, 2560, 2636, 2646, 2648, 2641, 2562, 2009, 1936, 1932, 1986, 1998, -29595, 19698, -887, 529, 532, 513, 532, 3047, 3042, 3064, 3071, 31772, 22104, -32566, -32035, 1239, 1240, 1237, 1223, 1223, 676, 701, 694, 653, 672, 695, 703, 691, 672, 697, 673, 2624, 2649, 2642, 2665, 2630, 2655, 2645, 1211, 1186, 1193, 1170, 1187, 1196, 1184, 1192, 1801, 1808, 1819, 1824, 1814, 1819, 1862, 1859, 1881, 1886, 2512, 2439, 2510, 2512, 2441, 2510, 2512, 2445, 2458, 2460, 2448, 2450, 2450, 2458, 2449, 2459, 2512, 2445, 2458, 2460, 2448, 2450, 2450, 2458, 2449, 2459, 2483, 2454, 2444, 2443, 2496, 2447, 2462, 2456, 2458, 2498, 2510, 2521, 2451, 2454, 2450, 2454, 2443, 2498, 2507, 2521, 2444, 2454, 2456, 2449, 2498, 1431, 1502, 1474, 1420, 1408, 2412, 2409, 2428, 2409, 918, 911, 900, 959, 908, 905, 915, 916, 1010, 978, 795, 844, 773, 795, 834, 773, 795, 853, 836, 836, 795, 851, 849, 832, 871, 779, 859, 839, 777, 773, 786, 834, 849, 838, 839, 861, 859, 858, 777, 773, 780, 774, 786, 856, 849, 834, 849, 856, 777, 773, 768, 1747, 1750, 1731, 1750, 1621, 1640, 1608, 1237, 1234, 1228, 2340, 2419, 2362, 2340, 2429, 2362, 2340, 2410, 2405, 2410, 2407, 2418, 2424, 2402, 2424, 2340, 2405, 2414, 2428, 2378, 2405, 2410, 2407, 2418, 2424, 2402, 2424, 2356, 2430, 2425, 2407, 2358, 2141, 2077, 2057, 2068, 2070, 2118, 1713, 1761, 1778, 1765, 1764, 1790, 1784, 1785, 1706, 1702, 1711, 1701, 1713, 1764, 1788, 1790, 1767, 1706, 1703, 1713, 1763, 1790, 1786, 1778, 1706, 2408, 2365, 2343, 2345, 2336, 2419, 2809, 2808, 2794, 2689, 2708, 2928, 2873, 2853, 2923, 2919, 1612, 1609, 1628, 1609, 580, 2127, 2103, 1880, 1865, 1882, 1883, 1869, 1293, 1300, 1311, 1316, 1289, 1310, 1302, 1306, 1289, 1296, 1288, 657, 648, 643, 696, 663, 654, 644, 3139, 3162, 3153, 3178, 3163, 3156, 3160, 3152, 2033, 2024, 2019, 2008, 2030, 2019, 1576, 1581, 1591, 1584, 3086, 3163, 3160, 3163, 3165, 3162, 2400, 2359, 2406, 2354, 2400, 2407, 2401, 2401, 2357, 2401, 2406, 2354, 2357, 2406, 2358, 2411, 
    2354, 2357, 2404, 2400, 2406, 2401, 2354, 2401, 2400, 2352, 2358, 2400, 2354, 2403, 2402, 2405, 1986, 1941, 2012, 1986, 1947, 2012, 1986, 1982, 1928, 1932, 1951, 1934, 1925, 1986, 1950, 1928, 1932, 1951, 1934, 1925, 2002, 1932, 2000, 563, 716, 665, 643, 653, 644, 727, 1066, 1128, 1133, 1144, 1133, 1073, 2365, 2411, 2426, 2428, 2430, 2342, 2346, 2365, 2423, 2418, 2422, 2418, 2415, 2342, 2346, 2345, 2365, 2420, 2408, 2342, 2346, 665, 668, 649, 668};
    private String h = C0014.m43(f41short, 0, 18, 2427);
    private String V0 = "";
    private String j = "";
    private String q = "";
    private String I = "";
    private String oC = C0017.m52(f41short, 18, 216, 2887);

    public Mayiys() {
        int m4 = C0001.m4();
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = m4 <= 0 ? 1709 : 1678;
                case 204:
                    System.out.println(Integer.valueOf(C0009.m31("M9")));
                    break;
                case 239:
                    break;
            }
            return;
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:21:0x0040, code lost:
    
        return r3;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    private java.util.HashMap<java.lang.String, java.lang.String> h(java.lang.String r7) {
        /*
            r6 = this;
            r0 = 0
            java.lang.String r1 = "ۢۡۦ"
            r2 = r0
            r3 = r0
            r4 = r1
            r1 = r0
        L7:
            int r4 = com.github.catvod.parser.C0006.m20(r4)
            switch(r4) {
                case 1748640: goto L40;
                case 1749639: goto L33;
                case 1750815: goto L1b;
                case 1752709: goto L3b;
                case 1753421: goto L28;
                case 1753542: goto L2d;
                default: goto Le;
            }
        Le:
            r1 = 234(0xea, float:3.28E-43)
            r4 = 10
            r5 = 672(0x2a0, float:9.42E-43)
            java.lang.String r1 = com.github.catvod.spider.merge.C0015.m47(r2, r1, r4, r5)
            java.lang.String r4 = "ۦ۟ۦ"
            goto L7
        L1b:
            r0 = 244(0xf4, float:3.42E-43)
            r4 = 12
            r5 = 2065(0x811, float:2.894E-42)
            java.lang.String r0 = com.github.catvod.parser.C0008.m27(r2, r0, r4, r5)
            java.lang.String r4 = "ۦۣۣ"
            goto L7
        L28:
            short[] r2 = com.github.catvod.spider.Mayiys.f41short
            java.lang.String r4 = "ۣۨۤ"
            goto L7
        L2d:
            r3.put(r1, r0)
            java.lang.String r4 = "ۡ۠۟"
            goto L7
        L33:
            java.util.HashMap r3 = new java.util.HashMap
            r3.<init>()
            java.lang.String r4 = "ۥۧۧ"
            goto L7
        L3b:
            short[] r2 = com.github.catvod.spider.Mayiys.f41short
            java.lang.String r4 = "ۡۤۡ"
            goto L7
        L40:
            return r3
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Mayiys.h(java.lang.String):java.util.HashMap");
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Failed to find 'out' block for switch in B:62:0x0263. Please report as an issue. */
    public String categoryContent(String str, String str2, boolean z, HashMap<String, String> hashMap) {
        String m12 = C0004.m12(f41short, 256, 11, 1153);
        String m35 = C0011.m35(f41short, 267, 7, 1338);
        String m1 = C0000.m1(f41short, 274, 5, 1902);
        String m9 = C0003.m9(f41short, 279, 8, 2280);
        String m17 = C0005.m17(f41short, 287, 6, 720);
        String m47 = C0015.m47(f41short, 293, 4, 2776);
        String m6 = C0002.m6(f41short, 297, 5, 936);
        String m472 = C0015.m47(f41short, 302, 4, 1973);
        String m62 = C0002.m6(f41short, 306, 4, 1690);
        String m3 = C0001.m3(f41short, 310, 4, 2348);
        String m27 = C0008.m27(f41short, 314, 4, 840);
        try {
            JSONObject jSONObject = new JSONObject();
            String str3 = this.h + C0014.m43(f41short, 318, 22, 2616);
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = hashMap == null ? 1709 : 1678;
                    case 204:
                        hashMap = new HashMap<>();
                        int i2 = 1740;
                        while (true) {
                            i2 ^= 1757;
                            switch (i2) {
                                case 17:
                                    i2 = 1771;
                                    continue;
                                case 54:
                                    break;
                                default:
                                    continue;
                            }
                        }
                        break;
                    case 239:
                        break;
                }
            }
            boolean containsKey = hashMap.containsKey(m27);
            int i3 = 1864;
            while (true) {
                i3 ^= 1881;
                switch (i3) {
                    case 17:
                        i3 = !containsKey ? 48736 : 48705;
                    case 47384:
                        break;
                    case 47417:
                        hashMap.put(m27, "");
                        break;
                    case 47483:
                }
            }
            boolean containsKey2 = hashMap.containsKey(m3);
            int i4 = 48767;
            while (true) {
                i4 ^= 48784;
                switch (i4) {
                    case 14:
                    case 45:
                        break;
                    case 76:
                        hashMap.put(m3, "");
                        break;
                    case 239:
                        i4 = !containsKey2 ? 48860 : 48829;
                }
            }
            boolean containsKey3 = hashMap.containsKey(m62);
            int i5 = 48891;
            while (true) {
                i5 ^= 48908;
                switch (i5) {
                    case 22:
                    case 53:
                        break;
                    case 503:
                        i5 = !containsKey3 ? 49635 : 48953;
                    case 32495:
                        hashMap.put(m62, "");
                        break;
                }
            }
            try {
                StringBuilder sb = new StringBuilder();
                sb.append(str3);
                sb.append(C0014.m43(f41short, 340, 11, 1294));
                sb.append(hashMap.get(m3));
                String str4 = (((((sb.toString() + C0001.m3(f41short, 351, 6, 543) + hashMap.get(m27)) + C0006.m18(f41short, 357, 6, 2986) + hashMap.get(m62)) + C0003.m9(f41short, 363, 8, 2531) + str) + C0003.m9(f41short, 371, 6, 856) + str2) + C0006.m18(f41short, 377, 9, 1264)) + C0005.m17(f41short, 386, 6, 1603) + getCsrf() + C0004.m12(f41short, 392, 5, 2798);
                JSONObject jSONObject2 = new JSONObject(fP.oq(str4, h(str4))).getJSONObject(C0013.m41(f41short, 397, 4, 1106));
                JSONArray jSONArray = jSONObject2.getJSONArray(m472);
                JSONArray jSONArray2 = new JSONArray();
                int i6 = 0;
                while (true) {
                    int length = jSONArray.length();
                    int i7 = 49666;
                    while (true) {
                        i7 ^= 49683;
                        switch (i7) {
                            case 17:
                                i7 = i6 < length ? 49759 : 49728;
                            case 50:
                            case 76:
                                JSONObject jSONObject3 = jSONArray.getJSONObject(i6);
                                JSONObject jSONObject4 = new JSONObject();
                                jSONObject4.put(m17, jSONObject3.getString(m17));
                                jSONObject4.put(m9, jSONObject3.getString(m9));
                                jSONObject4.put(m35, jSONObject3.getString(m35));
                                jSONObject4.put(m12, jSONObject3.getString(m12));
                                jSONArray2.put(jSONObject4);
                                int i8 = i6 + 1;
                                int i9 = 49790;
                                while (true) {
                                    i9 ^= 49807;
                                    switch (i9) {
                                        case 18:
                                            break;
                                        case 241:
                                            i9 = 49821;
                                            break;
                                    }
                                }
                                i6 = i8;
                                break;
                            case 83:
                                break;
                        }
                        int i10 = jSONObject2.getInt(m6);
                        jSONObject.put(m47, jSONObject2.getInt(m47));
                        jSONObject.put(C0012.m37(f41short, 401, 9, 1333), i10);
                        jSONObject.put(m1, jSONObject2.getInt(m1));
                        jSONObject.put(m6, i10 * 30);
                        jSONObject.put(m472, jSONArray2);
                        return jSONObject.toString();
                    }
                }
            } catch (Throwable th) {
                int i11 = 49914;
                while (true) {
                    i11 ^= 49931;
                    switch (i11) {
                        case 497:
                            i11 = 50596;
                            continue;
                        case 1711:
                            break;
                    }
                }
            }
        } catch (Throwable th2) {
        }
        return "";
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:26:0x0244. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:53:0x02df. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x01f7. Please report as an issue. */
    public String detailContent(List<String> list) {
        String m52 = C0017.m52(f41short, 410, 1, 2033);
        String m1 = C0000.m1(f41short, 411, 3, 1602);
        String m26 = C0007.m26(f41short, 414, 11, 2776);
        String m47 = C0015.m47(f41short, 425, 9, 1427);
        String m9 = C0003.m9(f41short, 434, 11, 2587);
        String m12 = C0000.m1(f41short, 445, 8, 817);
        String m30 = C0009.m30(f41short, 453, 8, 3186);
        String m522 = C0017.m52(f41short, 461, 7, 1405);
        String m35 = C0011.m35(f41short, 468, 8, 2980);
        String m262 = C0007.m26(f41short, 476, 6, 1254);
        try {
            Init.getPackage();
            ArrayList arrayList = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            JSONObject jSONObject = new JSONObject();
            JSONObject jSONObject2 = new JSONObject();
            StringBuilder sb = new StringBuilder();
            sb.append(this.h);
            sb.append(C0012.m37(f41short, 482, 28, 671));
            sb.append(list.get(0));
            sb.append(C0002.m6(f41short, 510, 6, 1548));
            sb.append(getCsrf());
            sb.append(C0009.m30(f41short, 516, 5, 1825));
            String sb2 = sb.toString();
            PrintStream printStream = System.out;
            StringBuilder sb3 = new StringBuilder();
            sb3.append(C0005.m17(f41short, 521, 3, 1378));
            sb3.append(sb2);
            printStream.println(sb3.toString());
            JSONObject jSONObject3 = new JSONObject(new JSONObject(fP.oq(sb2, h(sb2))).getString(C0006.m18(f41short, 524, 4, 1344)));
            jSONObject.put(m262, jSONObject3.getString(m262));
            jSONObject.put(m35, jSONObject3.getString(m35));
            jSONObject.put(m522, jSONObject3.getString(m522));
            jSONObject.put(C0006.m18(f41short, 528, 9, 1296), jSONObject3.getString(C0014.m43(f41short, 537, 9, 1286)));
            jSONObject.put(m30, jSONObject3.getString(m30));
            jSONObject.put(m12, jSONObject3.getString(m12));
            jSONObject.put(m9, jSONObject3.getString(m9));
            jSONObject.put(m47, jSONObject3.getString(m47));
            jSONObject.put(m26, "" + jSONObject3.getString(m26));
            JSONArray jSONArray = jSONObject3.getJSONArray(C0005.m17(f41short, 546, 13, 2983));
            int i = 0;
            while (true) {
                int length = jSONArray.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject4 = jSONArray.getJSONObject(i);
                            JSONArray jSONArray2 = jSONObject4.getJSONArray(C0013.m41(f41short, 559, 4, 1393));
                            ArrayList arrayList3 = new ArrayList();
                            String string = jSONObject4.getJSONObject(C0006.m18(f41short, 563, 11, 2404)).getString(C0007.m26(f41short, 574, 4, 1272));
                            int i3 = 0;
                            while (true) {
                                int length2 = jSONArray2.length();
                                int i4 = 1740;
                                while (true) {
                                    i4 ^= 1757;
                                    switch (i4) {
                                        case 17:
                                            i4 = i3 < length2 ? 1833 : 1802;
                                        case 54:
                                        case 471:
                                            break;
                                        case 500:
                                            JSONObject jSONObject5 = jSONArray2.getJSONObject(i3);
                                            arrayList3.add(jSONObject5.getString(C0002.m6(f41short, 578, 4, 3247)) + m52 + jSONObject5.getString(C0013.m41(f41short, 582, 4, 1376)) + C0003.m9(f41short, 586, 1, 2419) + jSONObject5.getString(C0008.m27(f41short, 587, 3, 596)).replace(m52, C0003.m9(f41short, 590, 1, 1359)));
                                            int i5 = i3 + 1;
                                            int i6 = 1864;
                                            while (true) {
                                                i6 ^= 1881;
                                                switch (i6) {
                                                    case 17:
                                                        i6 = 48674;
                                                    case 47483:
                                                        break;
                                                }
                                            }
                                            i3 = i5;
                                            break;
                                    }
                                    arrayList2.add(string);
                                    arrayList.add(TextUtils.join(C0002.m6(f41short, 591, 1, 343), arrayList3));
                                    int i7 = i + 1;
                                    int i8 = 48767;
                                    while (true) {
                                        i8 ^= 48784;
                                        switch (i8) {
                                            case 14:
                                                break;
                                            case 239:
                                                i8 = 48798;
                                                break;
                                        }
                                    }
                                    i = i7;
                                }
                            }
                            break;
                        case 239:
                            break;
                    }
                    String join = TextUtils.join(m1, arrayList2);
                    String join2 = TextUtils.join(m1, arrayList);
                    jSONObject.put(C0018.m56(f41short, 592, 13, 1353), join);
                    jSONObject.put(C0004.m12(f41short, 605, 12, 1270), join2);
                    JSONArray jSONArray3 = new JSONArray();
                    jSONArray3.put(jSONObject);
                    jSONObject2.put(C0011.m35(f41short, 617, 4, 1060), jSONArray3);
                    return jSONObject2.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:48:0x0076, code lost:
    
        return r3;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.String getCsrf() {
        /*
            r11 = this;
            r2 = 0
            r1 = 0
            java.lang.String r0 = "ۨ۠۟"
            r4 = r1
            r5 = r1
            r6 = r2
            r8 = r2
            r2 = r1
            r3 = r1
        Lb:
            int r0 = com.github.catvod.parser.C0006.m20(r0)
            switch(r0) {
                case 1746910: goto L18;
                case 1747652: goto L6f;
                case 1748771: goto L56;
                case 1748833: goto L5d;
                case 1749608: goto L42;
                case 1750719: goto L1f;
                case 1752456: goto L76;
                case 1752519: goto L69;
                case 1753482: goto L2c;
                case 1753666: goto L50;
                case 1754442: goto L24;
                case 1754626: goto L49;
                case 1755367: goto L62;
                case 1755368: goto L38;
                case 1755464: goto L3d;
                default: goto L12;
            }
        L12:
            r4.append(r3)
            java.lang.String r0 = "ۥۣۡ"
            goto Lb
        L18:
            java.lang.String r2 = com.github.catvod.spider.merge.O.I(r5, r3)
            java.lang.String r0 = "ۡۦۦ"
            goto Lb
        L1f:
            java.lang.String r3 = r11.q
            java.lang.String r0 = "ۦۣۧ"
            goto Lb
        L24:
            java.lang.StringBuilder r4 = new java.lang.StringBuilder
            r4.<init>()
            java.lang.String r0 = "ۨ۠۠"
            goto Lb
        L2c:
            r0 = 621(0x26d, float:8.7E-43)
            r5 = 5
            r10 = 3113(0xc29, float:4.362E-42)
            java.lang.String r5 = com.github.catvod.spider.merge.C0012.m37(r1, r0, r5, r10)
            java.lang.String r0 = "ۢ۠ۦ"
            goto Lb
        L38:
            java.lang.String r3 = r11.j
            java.lang.String r0 = "۠ۤ۟"
            goto Lb
        L3d:
            java.lang.String r3 = r11.oC
            java.lang.String r0 = "۟ۦۥ"
            goto Lb
        L42:
            java.lang.String r3 = java.net.URLEncoder.encode(r2, r5)
            java.lang.String r0 = "ۥ۟ۢ"
            goto Lb
        L49:
            r6 = 1000(0x3e8, double:4.94E-321)
            long r6 = r8 / r6
            java.lang.String r0 = "ۡۤۦ"
            goto Lb
        L50:
            r4.append(r3)
            java.lang.String r0 = "ۣ۠۟"
            goto Lb
        L56:
            java.lang.String r5 = java.lang.String.valueOf(r6)
            java.lang.String r0 = "ۧۡۤ"
            goto Lb
        L5d:
            short[] r1 = com.github.catvod.spider.Mayiys.f41short
            java.lang.String r0 = "ۦۡۥ"
            goto Lb
        L62:
            long r8 = java.lang.System.currentTimeMillis()
            java.lang.String r0 = "ۧۧۢ"
            goto Lb
        L69:
            r4.append(r5)
            java.lang.String r0 = "ۣۥۡ"
            goto Lb
        L6f:
            java.lang.String r5 = r4.toString()
            java.lang.String r0 = "ۣۣۨ"
            goto Lb
        L76:
            return r3
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Mayiys.getCsrf():java.lang.String");
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:39:0x00de. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:47:0x00fc. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x00a2. Please report as an issue. */
    public String homeContent(boolean z) {
        String m43 = C0014.m43(f41short, 626, 7, 1302);
        String m6 = C0002.m6(f41short, 633, 9, 398);
        try {
            String str = this.h + C0005.m17(f41short, 642, 27, 2623) + getCsrf() + C0000.m1(f41short, 669, 5, 2047);
            System.out.println(C0017.m52(f41short, 674, 3, 914) + str);
            JSONArray jSONArray = new JSONObject(fP.oq(str, h(str))).getJSONObject(C0007.m26(f41short, 677, 4, 629)).getJSONArray(C0011.m35(f41short, 681, 4, 2955));
            JSONArray jSONArray2 = new JSONArray();
            int i = 0;
            while (true) {
                int length = jSONArray.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject = new JSONObject();
                            JSONObject jSONObject2 = jSONArray.getJSONObject(i);
                            String string = jSONObject2.getString(m6);
                            boolean contains = string.contains(C0006.m18(f41short, 685, 4, 2345));
                            int i3 = 1740;
                            while (true) {
                                i3 ^= 1757;
                                switch (i3) {
                                    case 17:
                                        i3 = contains ? 1833 : 1802;
                                    case 54:
                                    case 471:
                                        jSONObject.put(m43, jSONObject2.getString(m43));
                                        jSONObject.put(m6, string);
                                        jSONArray2.put(jSONObject);
                                        break;
                                    case 500:
                                        int i4 = 1864;
                                        while (true) {
                                            i4 ^= 1881;
                                            switch (i4) {
                                                case 17:
                                                    i4 = 48674;
                                                case 47483:
                                                    break;
                                            }
                                            break;
                                        }
                                }
                            }
                            int i5 = i + 1;
                            int i6 = 48767;
                            while (true) {
                                i6 ^= 48784;
                                switch (i6) {
                                    case 14:
                                        break;
                                    case 239:
                                        i6 = 48798;
                                }
                            }
                            i = i5;
                            break;
                        case 239:
                            break;
                    }
                    JSONObject jSONObject3 = new JSONObject();
                    jSONObject3.put(C0014.m43(f41short, 689, 5, 1204), jSONArray2);
                    return jSONObject3.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:26:0x00c3. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x009a. Please report as an issue. */
    public String homeVideoContent() {
        String m1 = C0000.m1(f41short, 694, 11, 722);
        String m35 = C0011.m35(f41short, 705, 7, 2614);
        String m56 = C0018.m56(f41short, 712, 8, 1229);
        String m37 = C0012.m37(f41short, 720, 6, 1919);
        String m30 = C0009.m30(f41short, 726, 4, 1834);
        try {
            String str = this.h + C0005.m17(f41short, 730, 51, 2559) + getCsrf() + C0012.m37(f41short, 781, 5, 1457);
            JSONObject jSONObject = new JSONObject(fP.oq(str, h(str)));
            JSONArray jSONArray = new JSONArray();
            JSONArray jSONArray2 = jSONObject.getJSONObject(C0012.m37(f41short, 786, 4, 2312)).getJSONArray(m30);
            int i = 0;
            while (true) {
                int length = jSONArray2.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONArray jSONArray3 = jSONArray2.getJSONObject(i).getJSONArray(C0015.m47(f41short, 790, 8, 992));
                            int i3 = 0;
                            while (true) {
                                int length2 = jSONArray3.length();
                                int i4 = 1740;
                                while (true) {
                                    i4 ^= 1757;
                                    switch (i4) {
                                        case 17:
                                            i4 = i3 < length2 ? 1833 : 1802;
                                        case 54:
                                        case 471:
                                            break;
                                        case 500:
                                            JSONObject jSONObject2 = new JSONObject();
                                            JSONObject jSONObject3 = jSONArray3.getJSONObject(i3);
                                            jSONObject2.put(m37, jSONObject3.getString(m37));
                                            jSONObject2.put(m56, jSONObject3.getString(m56));
                                            jSONObject2.put(m35, jSONObject3.getString(m35));
                                            jSONObject2.put(m1, jSONObject3.getString(m1));
                                            jSONArray.put(jSONObject2);
                                            i3++;
                                            int i5 = 1864;
                                            while (true) {
                                                i5 ^= 1881;
                                                switch (i5) {
                                                    case 17:
                                                        i5 = 48674;
                                                        break;
                                                    case 47483:
                                                        break;
                                                }
                                            }
                                            break;
                                    }
                                    int i6 = i + 1;
                                    int i7 = 48767;
                                    while (true) {
                                        i7 ^= 48784;
                                        switch (i7) {
                                            case 14:
                                                break;
                                            case 239:
                                                i7 = 48798;
                                                break;
                                        }
                                    }
                                    i = i6;
                                }
                            }
                            break;
                        case 239:
                            break;
                    }
                    JSONObject jSONObject4 = new JSONObject();
                    jSONObject4.put(m30, jSONArray);
                    return jSONObject4.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    public void init(Context context, String str) {
        super.init(context, str);
        String[] split = fP.oq(new String(Base64.decode(str.substring(1), 0)), h("")).split(C0018.m56(f41short, 798, 2, 942));
        this.h = split[0];
        try {
            this.j = O.V0(this.oC, new JSONObject(fP.oq(this.h + C0012.m37(f41short, 800, 41, 820), h(""))).getString(C0013.m41(f41short, 841, 4, 1719)));
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                        break;
                    case 49:
                        i = 1647;
                        break;
                }
            }
        } catch (Exception e) {
            this.j = split[1];
        }
        this.q = split[2];
        this.I = split[3];
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:20:0x0047. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:25:0x0097. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:54:0x019e. Please report as an issue. */
    public String playerContent(String str, String str2, List<String> list) {
        String V0;
        String m52 = C0017.m52(f41short, 845, 1, 1557);
        try {
            JSONObject jSONObject = new JSONObject();
            String[] split = str2.split(C0004.m12(f41short, 846, 2, 1588));
            String str3 = split[1];
            String str4 = split[0];
            boolean contains = str2.contains(m52);
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = contains ? 1709 : 1678;
                    case 204:
                        String[] split2 = str3.split(m52);
                        int i2 = 0;
                        V0 = "";
                        while (true) {
                            int length = split2.length;
                            int i3 = 1740;
                            while (true) {
                                i3 ^= 1757;
                                switch (i3) {
                                    case 17:
                                        i3 = i2 < length ? 1833 : 1802;
                                    case 54:
                                    case 471:
                                        break;
                                    case 500:
                                        String str5 = V0 + O.V0(this.oC, split2[i2]);
                                        int i4 = i2 + 1;
                                        int i5 = 1864;
                                        while (true) {
                                            i5 ^= 1881;
                                            switch (i5) {
                                                case 17:
                                                    i5 = 48674;
                                                    break;
                                                case 47483:
                                                    break;
                                            }
                                        }
                                        i2 = i4;
                                        V0 = str5;
                                        break;
                                }
                                break;
                            }
                        }
                    case 239:
                        V0 = O.V0(this.oC, str3);
                        break;
                }
            }
            boolean oC = CE.oC(V0);
            String m6 = C0002.m6(f41short, 848, 3, 1184);
            int i6 = 48767;
            while (true) {
                i6 ^= 48784;
                switch (i6) {
                    case 14:
                    case 45:
                        break;
                    case 76:
                        long currentTimeMillis = System.currentTimeMillis();
                        String str6 = this.h + C0009.m30(f41short, 851, 32, 2315) + URLEncoder.encode(V0) + C0018.m56(f41short, 883, 6, 2171) + str4 + C0008.m27(f41short, 889, 25, 1687) + currentTimeMillis + C0012.m37(f41short, 914, 6, 2382) + URLEncoder.encode(O.I(this.j + (currentTimeMillis / 1000) + this.q, this.oC), C0018.m56(f41short, 920, 5, 2732)) + C0006.m18(f41short, 925, 5, 2902);
                        String string = new JSONObject(fP.oq(str6, h(str6))).getJSONObject(C0011.m35(f41short, 930, 4, 1576)).getString(m6);
                        boolean contains2 = string.contains(C0012.m37(f41short, 934, 1, 608));
                        int i7 = 48891;
                        while (true) {
                            i7 ^= 48908;
                            switch (i7) {
                                case 22:
                                    break;
                                case 53:
                                    V0 = O.j(this.oC, string);
                                    break;
                                case 503:
                                    if (!contains2) {
                                        break;
                                    } else {
                                        i7 = 49635;
                                    }
                                case 32495:
                                    String[] split3 = string.split(C0017.m52(f41short, 935, 2, 2067));
                                    int i8 = 0;
                                    V0 = "";
                                    while (true) {
                                        int length2 = split3.length;
                                        int i9 = 49666;
                                        while (true) {
                                            i9 ^= 49683;
                                            switch (i9) {
                                                case 17:
                                                    i9 = i8 < length2 ? 49759 : 49728;
                                                case 50:
                                                case 76:
                                                    String str7 = V0 + O.V0(this.oC, split3[i8]);
                                                    int i10 = i8 + 1;
                                                    int i11 = 49790;
                                                    while (true) {
                                                        i11 ^= 49807;
                                                        switch (i11) {
                                                            case 18:
                                                                break;
                                                            case 241:
                                                                i11 = 49821;
                                                                break;
                                                        }
                                                    }
                                                    i8 = i10;
                                                    V0 = str7;
                                                    break;
                                                case 83:
                                                    break;
                                            }
                                            break;
                                        }
                                    }
                                    break;
                                default:
                                    continue;
                            }
                            i7 = 48953;
                        }
                        break;
                    case 239:
                        i6 = oC ? 48860 : 48829;
                }
            }
            jSONObject.put(C0017.m52(f41short, 937, 5, 1832), 0);
            jSONObject.put(m6, V0);
            return jSONObject.toString();
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x013c. Please report as an issue. */
    public String searchContent(String str, boolean z) {
        String m26 = C0007.m26(f41short, 942, 11, 1403);
        String m37 = C0012.m37(f41short, 953, 7, 743);
        String m9 = C0003.m9(f41short, 960, 8, 3125);
        String m6 = C0002.m6(f41short, 968, 6, 1927);
        String m52 = C0017.m52(f41short, 974, 4, 1604);
        try {
            JSONObject jSONObject = new JSONObject();
            StringBuilder sb = new StringBuilder(C0013.m41(f41short, 978, 6, 3178));
            sb.append((System.currentTimeMillis() / 1000) + 1549284568);
            String valueOf = String.valueOf(sb);
            String m35 = C0011.m35(f41short, 984, 32, 2387);
            StringBuilder sb2 = new StringBuilder();
            sb2.append(this.h);
            sb2.append(C0014.m43(f41short, 1016, 23, 2029));
            sb2.append(URLEncoder.encode(O.q(this.oC, valueOf + C0005.m17(f41short, 1039, 1, 535) + m35)));
            sb2.append(C0004.m12(f41short, 1040, 6, 746));
            sb2.append(URLEncoder.encode(jP.Qy(this.j + (System.currentTimeMillis() / 1000) + this.I, valueOf, m35)));
            sb2.append(C0006.m18(f41short, 1046, 6, 1036));
            sb2.append(URLEncoder.encode(str));
            sb2.append(C0001.m3(f41short, 1052, 21, 2331));
            String sb3 = sb2.toString();
            String oq = fP.oq(sb3, h(sb3));
            JSONArray jSONArray = new JSONArray();
            JSONArray jSONArray2 = new JSONObject(oq).getJSONObject(C0011.m35(f41short, 1073, 4, 765)).getJSONArray(m52);
            int i = 0;
            while (true) {
                int length = jSONArray2.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject2 = jSONArray2.getJSONObject(i);
                            JSONObject jSONObject3 = new JSONObject();
                            jSONObject3.put(m6, jSONObject2.getString(m6));
                            jSONObject3.put(m9, jSONObject2.getString(m9));
                            jSONObject3.put(m37, jSONObject2.getString(m37));
                            jSONObject3.put(m26, jSONObject2.getString(m26));
                            jSONArray.put(jSONObject3);
                            int i3 = i + 1;
                            int i4 = 1740;
                            while (true) {
                                i4 ^= 1757;
                                switch (i4) {
                                    case 17:
                                        i4 = 1771;
                                        break;
                                    case 54:
                                        break;
                                }
                            }
                            i = i3;
                            break;
                        case 239:
                            break;
                    }
                    jSONObject.put(m52, jSONArray);
                    return jSONObject.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }
}
